Crate maelstrom_base

source ·
Expand description

Core structs used by the broker, worker, and clients. Everything in this crate must be usable from wasm.

Modules§

  • Messages sent between various binaries.
  • This implements a simple ring-buffer backed by a vector that has serde support
  • Contains data-structures for maintaining historical statistics of jobs

Macros§

  • Creates a EnumSet literal, which can be used in const contexts.
  • Like the vec! macro, but enforces at least one argument. A nice short-hand for constructing NonEmpty values.

Structs§

  • ID of a client connection. These share the same ID space as WorkerId.
  • A client-relative job ID. Clients can assign these however they like.
  • An efficient set type for enums.
  • ID of a group. This should be compatible with gid_t.
  • The outcome of a completed job. That is, a job that ran to completion, instead of timing out, being canceled, etc.
  • An iterator over the variants of JobDevice
  • The output and duration of a job that ran for some amount of time. This is generated regardless of how the job terminated. From our point of view, it doesn’t matter. We ran the job until it was terminated, and gathered its output.
  • An absolute job ID that includes a ClientId for disambiguation.
  • All necessary information for the worker to execute a job.
  • Non-empty vector.
  • A SHA-256 digest.
  • Error indicating that two digests that should have matched didn’t.
  • A count of seconds.
  • ID of a user. This should be compatible with uid_t.
  • A slice of a UTF-8 path (akin to str).
  • An owned, mutable UTF-8 path (akin to String).
  • ID of a worker connection. These share the same ID space as ClientId.

Enums§

Type Aliases§

  • All relevant information about the outcome of a job. This is what’s sent around between the Worker, Broker, and Client.
  • A common Result type in the worker.